using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace Minesweeper02
{
	/// <summary>
	/// Summary description for BestTime.
	/// </summary>
	public class BestTime : System.Windows.Forms.Form
	{
	    string[] str;
		private System.Windows.Forms.Label beginnerLevel;
		private System.Windows.Forms.Label BeginnerBestTime;
		private System.Windows.Forms.Label BeginnerPlayerName;
		private System.Windows.Forms.Label intermediateLevel;
		private System.Windows.Forms.Label IntermediateBestTime;
		private System.Windows.Forms.Label IntermediatePlayerName;
		private System.Windows.Forms.Label expertLevel;
		private System.Windows.Forms.Label ExpertBestTime;
		private System.Windows.Forms.Label ExpertPlayerName;
		private System.Windows.Forms.Button Reset;
		private System.Windows.Forms.Button Ok;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public BestTime()
		{
			//
			// Required for Windows Form Designer support
			//
			MineResourceSet rs=new MineResourceSet("Play.resources");
			str=rs.LoadBestTime();
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.beginnerLevel = new System.Windows.Forms.Label();
			this.BeginnerBestTime = new System.Windows.Forms.Label();
			this.BeginnerPlayerName = new System.Windows.Forms.Label();
			this.intermediateLevel = new System.Windows.Forms.Label();
			this.IntermediateBestTime = new System.Windows.Forms.Label();
			this.IntermediatePlayerName = new System.Windows.Forms.Label();
			this.expertLevel = new System.Windows.Forms.Label();
			this.ExpertBestTime = new System.Windows.Forms.Label();
			this.ExpertPlayerName = new System.Windows.Forms.Label();
			this.Reset = new System.Windows.Forms.Button();
			this.Ok = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// beginnerLevel
			// 
			this.beginnerLevel.Location = new System.Drawing.Point(8, 24);
			this.beginnerLevel.Name = "beginnerLevel";
			this.beginnerLevel.Size = new System.Drawing.Size(96, 24);
			this.beginnerLevel.TabIndex = 0;
			this.beginnerLevel.Text = "Beginner";
			this.beginnerLevel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// BeginnerBestTime
			// 
			this.BeginnerBestTime.Location = new System.Drawing.Point(104, 24);
			this.BeginnerBestTime.Name = "BeginnerBestTime";
			this.BeginnerBestTime.Size = new System.Drawing.Size(96, 24);
			this.BeginnerBestTime.TabIndex = 1;
			this.BeginnerBestTime.Text = str[0];
			this.BeginnerBestTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// BeginnerPlayerName
			// 
			this.BeginnerPlayerName.Location = new System.Drawing.Point(200, 24);
			this.BeginnerPlayerName.Name = "BeginnerPlayerName";
			this.BeginnerPlayerName.Size = new System.Drawing.Size(80, 24);
			this.BeginnerPlayerName.TabIndex = 2;
			this.BeginnerPlayerName.Text = str[1];
			this.BeginnerPlayerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// intermediateLevel
			// 
			this.intermediateLevel.Location = new System.Drawing.Point(8, 56);
			this.intermediateLevel.Name = "intermediateLevel";
			this.intermediateLevel.Size = new System.Drawing.Size(96, 24);
			this.intermediateLevel.TabIndex = 3;
			this.intermediateLevel.Text = "Intermediate";
			this.intermediateLevel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// IntermediateBestTime
			// 
			this.IntermediateBestTime.Location = new System.Drawing.Point(104, 56);
			this.IntermediateBestTime.Name = "IntermediateBestTime";
			this.IntermediateBestTime.Size = new System.Drawing.Size(96, 24);
			this.IntermediateBestTime.TabIndex = 4;
			this.IntermediateBestTime.Text = str[2];
			this.IntermediateBestTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// IntermediatePlayerName
			// 
			this.IntermediatePlayerName.Location = new System.Drawing.Point(200, 56);
			this.IntermediatePlayerName.Name = "IntermediatePlayerName";
			this.IntermediatePlayerName.Size = new System.Drawing.Size(80, 24);
			this.IntermediatePlayerName.TabIndex = 5;
			this.IntermediatePlayerName.Text = str[3];
			this.IntermediatePlayerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// expertLevel
			// 
			this.expertLevel.Location = new System.Drawing.Point(8, 88);
			this.expertLevel.Name = "expertLevel";
			this.expertLevel.Size = new System.Drawing.Size(96, 24);
			this.expertLevel.TabIndex = 6;
			this.expertLevel.Text = "Expert";
			this.expertLevel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// ExpertBestTime
			// 
			this.ExpertBestTime.Location = new System.Drawing.Point(104, 88);
			this.ExpertBestTime.Name = "ExpertBestTime";
			this.ExpertBestTime.Size = new System.Drawing.Size(96, 24);
			this.ExpertBestTime.TabIndex = 7;
			this.ExpertBestTime.Text = str[4];
			this.ExpertBestTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// ExpertPlayerName
			// 
			this.ExpertPlayerName.Location = new System.Drawing.Point(200, 88);
			this.ExpertPlayerName.Name = "ExpertPlayerName";
			this.ExpertPlayerName.Size = new System.Drawing.Size(80, 24);
			this.ExpertPlayerName.TabIndex = 8;
			this.ExpertPlayerName.Text = str[5];
			this.ExpertPlayerName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// Reset
			// 
			this.Reset.Location = new System.Drawing.Point(48, 128);
			this.Reset.Name = "Reset";
			this.Reset.TabIndex = 9;
			this.Reset.Text = "Reset Score";
			this.Reset.Click += new System.EventHandler(this.Reset_Click);
			// 
			// Ok
			// 
			this.Ok.Location = new System.Drawing.Point(168, 128);
			this.Ok.Name = "Ok";
			this.Ok.TabIndex = 10;
			this.Ok.Text = "Ok";
			this.Ok.Click += new System.EventHandler(this.Close_Click);
			// 
			// BestTime
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(290, 160);
			this.Controls.Add(this.Ok);
			this.Controls.Add(this.Reset);
			this.Controls.Add(this.ExpertPlayerName);
			this.Controls.Add(this.ExpertBestTime);
			this.Controls.Add(this.expertLevel);
			this.Controls.Add(this.IntermediatePlayerName);
			this.Controls.Add(this.IntermediateBestTime);
			this.Controls.Add(this.intermediateLevel);
			this.Controls.Add(this.BeginnerPlayerName);
			this.Controls.Add(this.BeginnerBestTime);
			this.Controls.Add(this.beginnerLevel);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "BestTime";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "Fastest Mine Sweeper";
			this.ResumeLayout(false);

		}
		#endregion

		private void Close_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void Reset_Click(object sender, System.EventArgs e)
		{
			MineResourceSet rs=new MineResourceSet("Play.resources");
			rs.ResetDefaultBestTime();
			string[] str=rs.LoadBestTime();
			this.BeginnerBestTime.Text=str[0];
			this.BeginnerPlayerName.Text=str[1];
			this.IntermediateBestTime.Text=str[2];
			this.IntermediatePlayerName.Text=str[3];
			this.ExpertBestTime.Text=str[4];
			this.ExpertPlayerName.Text=str[5];
			
		}
		//static void Main(){
		//	Application.Run(new BestTime());
		//}
	}
}
